﻿Public Class main
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim q As String = Request.QueryString("q")

        Dim lst As List(Of FMW.Song)

        If Not String.IsNullOrEmpty(q) Then
            'lst = FMW.FMWBO.ListSongs(q)
        Else
            lst = FMW.FMWBO.GetTop5LastUpdatedSongs()
        End If

        ltlCount.Text = FMW.FMWBO.SongsCount

        fillGrid(lst)

    End Sub

    Private Sub fillGrid(ByVal o As List(Of FMW.Song))
        If o IsNot Nothing AndAlso o.Count > 0 Then
            rptSongs.DataSource = o
            rptSongs.DataBind()

        Else
            ltl1.Text = "Sorry!!! No Record found."
        End If
    End Sub

End Class